The New York City Council passed a bill that would shield workers from being fired without a valid reason. Fast food restaurants say the new rules will make it harder to hire and keep the best workers.

Gavin Florence was returning to New York City from vacation last fall when his flight got delayed. He said he called his manager at a Chipotle in Manhattan to say he was going to miss his shift. A co-worker covered for him. The next day, Mr. Florence said he was fired.

Yeral Martinez, who worked at a different Manhattan Chipotle, said he was also dismissed after calling out sick because of back pain. After losing his job, he said he lost his apartment and ended up in a homeless shelter.

Fast food workers have long complained that they have little job security and are often fired for a single transgression or for seemingly trivial reasons, like not smiling enough.

The challenges they face have come to the forefront during the pandemic, as they have emerged as essential employees who have been asked to continue working even as the city went into lockdown.